<html>
    <head>
        <title>Welcome to Grails</title>
		<meta name="layout" content="main" />
    </head>
    <body>
        <h1 style="margin-left:20px;">Welcome to Grails</h1>
        <p style="margin-left:20px;width:80%">Congratulations, you have successfully started your first Grails application! At the moment
        this is the default page, feel free to modify it to either redirect to a controller or display whatever
        content you may choose. Below is a list of controllers that are currently deployed in this application,
        click on each to execute its default action:</p>
        <div class="dialog" style="margin-left:20px;width:60%;"> <br>
        <ul>
		    <li><a href="javascript:switchID('tab1');">Index Directory </a></li>
		    <li><a href="javascript:switchID('tab2');">Index File </a></li>
		    <li><a href=" <g:createLink controller="library" action="search"/> " > Go to search page </a></li>
		</ul>
		</br>
	    <p>
	    <div id="tab1" style="display:block;" >
		    <g:form controller="index" action="index">
		    <table>
			    <tr>
			    	<td>Input directory path :</td>
				    <td><g:textField name="directory_name" /> </td>
				</tr>
				<tr>
					<td>Description :</td>
					<td><g:textField name="description" /> </td>
				</tr>
				<tr>
					<td> </td>
					<td><input type="submit" value="Index" /> </td>
				</tr>
			</table>	
			</g:form>
	     </div> 
	     </p>
	     <p>
	     <g:form controller="index" action="indexFile">
         <div id="tab2" style="display:none;" >
		 	<table>
			    <tr>
				    	<td>Input file :</td>
					    <td><input type="file" name="myFile"/> </td>
					</tr>
					<tr>
						<td>Description :</td>
						<td><g:textField name="description" /> </td>
					</tr>
					<tr>
						<td> </td>
						<td><input type="submit" value="Index" /> </td>
					</tr>
		 	</table>
         </div>
         </g:form>
         </p>
        	

        </div> 	   

    </body>
</html>